package com.ojoin.trade.supplyloan_core.web.oa;

import org.activiti.engine.delegate.DelegateTask;
import org.activiti.engine.delegate.TaskListener;
import org.springframework.stereotype.Service;

/**
 * 放款流程根据所属公司设置candidateGroups，节点处理器
 */
@Service
public class SLCreditfirstTrialProcessor implements TaskListener {
	private static final long serialVersionUID = 1L;
	public void notify(DelegateTask delegateTask) {
		String nodeKey=delegateTask.getTaskDefinitionKey();
		if("firstTrial".equals(nodeKey)){
			//事件自动设置-处理者:业务专员变量
			delegateTask.setVariable("sl_ywzy_initiator", delegateTask.getAssignee());
		}
		if("retrial".equals(nodeKey)){
			//事件自动设置-处理者:业务主管变量
			delegateTask.setVariable("sl_ywzg_initiator", delegateTask.getAssignee());
		}
		 
	}
}
